<%@ page language="java" import="java.util.*"
	contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="layout.tld" prefix="e"%>
<e:override name="title">${OnlineUser.username}的个人信息</e:override>

<e:override name="my_right">
	<div class="col-md-10">
		<div class="panel panel-default">
			<div class="panel-heading">我的文章</div>
			<div class="panel-body">
				<table class="table">
					<thead>
						<tr>
							<th>标题</th>
							<th>时间</th>
							<th>操作</th>
						</tr>
					</thead>
					<tbody>
						<c:forEach var="msg" items="${page.list}">
							<tr>
								<td>${msg.title}</td>
								<td>${msg.publishDate}</td>
								<td><a
									href="<c:url value="/message/delete/${msg.messId}"/>"><input
										type="button" class="btn default" value="删除"></a><a
									href="<c:url value="/message/update/${msg.messId}"/>"><input
										type="button" class="btn default" value="编辑"></a></td>
							</tr>
							<tr></tr>
						</c:forEach>
					<tbody>
				</table>
				<hr>
				<div class="clear"></div>

				<div class="page">


					<a href="<c:url value="/message/showMyArticle?pageIndex=1" />">首页</a>
					<a
						href="<c:url value="/message/showMyArticle?pageIndex=${page.previousPage}" />"
						class="btn <c:if test="${hasPreviousPage}">disabled</c:if>">上一页</a>
					<span class="current">${page.pageIndex}</span> <a
						class="btn <c:if test="${hasNextPage}">disabled</c:if>"
						href="<c:url value="/message/showMyArticle?pageIndex=${page.nextPage}" />">下一页</a>
					<a
						href="<c:url value="/message/showMyArticle?pageIndex=${page.totalPage }" />"
						title="尾页">尾页&raquo;</a> <span class="current">共${page.totalPage}
						页</span>
				</div>
			</div>
		</div>
	</div>
</e:override>
<%@include file="/myhome.jsp"%>